package algorithm_study.leecode;

import java.util.Scanner;

public class ScoreAnalyze {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int num=scan.nextInt();
        float count60=0;
        float count85=0;
        for(int i=0;i<num;i++){
            int temp=scan.nextInt();
            if(temp>=60)count60++;
            else if(temp>=85)count85++;
        }
        int avg60=(int)(count60/num);
        float avg60d=count60/num;
        if((avg60d-0.5)>=(avg60)){
            avg60+=1;
        }
        int avg85=(int)(count85/num);
        float avg85d=(count85/num);
        if((avg85d-0.5)>=(avg85)){
            avg85+=1;
        }
        System.out.println(avg60);
        System.out.println(avg85);
        scan.close();
    }
}
